<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns="gme://forms.AGNIS/2.0/net.agnis.forms" elementFormDefault="qualified" targetNamespace="gme://forms.AGNIS/2.0/net.agnis.forms" version="2.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="Question" type="Question" />
  <xs:complexType name="Question">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="errorCollection" type="FormElementError" />
      <xs:element minOccurs="0" maxOccurs="1" name="value" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="alternateValue" type="xs:string" />
    </xs:sequence>
    <xs:attribute name="id" type="xs:long" />
    <xs:attribute name="moduleId" type="xs:long" />
    <xs:attribute name="dataElementPublicId" type="xs:long" />
    <xs:attribute name="dataElementVersion" type="xs:decimal" />
    <xs:attribute name="alternateMetadataType" type="xs:string" />
    <xs:attribute name="alternateMetadataId" type="xs:string" />
    <xs:attribute name="errorException" type="xs:string" />
    <xs:attribute name="delete" type="xs:boolean" />
    <xs:attribute name="valueMeaningPublicId" type="xs:long" />
    <xs:attribute name="valueMeaningVersion" type="xs:decimal" />
    <xs:attribute name="modificationTime" type="xs:dateTime" />
    <xs:attribute name="modificationUserId" type="xs:string" />
  </xs:complexType>
  <xs:element name="Module" type="Module" />
  <xs:complexType name="Module">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="questionCollection" type="Question" />
    </xs:sequence>
    <xs:attribute name="id" type="xs:long" />
    <xs:attribute name="formRevisionId" type="xs:long" />
    <xs:attribute name="publicId" type="xs:long" />
    <xs:attribute name="version" type="xs:decimal" />
    <xs:attribute name="alternateMetadataType" type="xs:string" />
    <xs:attribute name="alternateMetadataId" type="xs:string" />
    <xs:attribute name="repeatSequenceNumber" type="xs:integer" />
    <xs:attribute name="modificationTime" type="xs:dateTime" />
    <xs:attribute name="modificationUserId" type="xs:string" />
  </xs:complexType>
  <xs:element name="Institution" type="Institution" />
  <xs:complexType name="Institution">
    <xs:sequence />
    <xs:attribute name="id" type="xs:long" />
    <xs:attribute name="uniqueName" type="xs:string" />
    <xs:attribute name="currentRetrievalSequenceNumber" type="xs:long" />
    <xs:attribute name="modificationTime" type="xs:dateTime" />
    <xs:attribute name="modificationUserId" type="xs:string" />
  </xs:complexType>
  <xs:element name="FormRevision" type="FormRevision" />
  <xs:complexType name="FormRevision">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="1" name="form" type="Form" />
      <xs:element minOccurs="0" maxOccurs="unbounded" name="errorCollection" type="FormElementError" />
      <xs:element minOccurs="0" maxOccurs="unbounded" name="moduleCollection" type="Module" />
    </xs:sequence>
    <xs:attribute name="id" type="xs:long" />
    <xs:attribute name="formId" type="xs:long" />
    <xs:attribute name="sequenceNumber" type="xs:integer" />
    <xs:attribute name="receivedTime" type="xs:dateTime" />
    <xs:attribute name="status" type="xs:string" />
    <xs:attribute name="lockString" type="xs:string" />
    <xs:attribute name="lockOverride" type="xs:boolean" />
    <xs:attribute name="diagnosticMessage" type="xs:string" />
    <xs:attribute name="modificationTime" type="xs:dateTime" />
    <xs:attribute name="modificationUserId" type="xs:string" />
  </xs:complexType>
  <xs:element name="Retrieval" type="Retrieval" />
  <xs:complexType name="Retrieval">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="1" name="subscriber" type="Institution" />
      <xs:element minOccurs="0" maxOccurs="unbounded" name="formRevisionCollection" type="FormRevision" />
    </xs:sequence>
    <xs:attribute name="id" type="xs:long" />
    <xs:attribute name="subscriberInstitutionId" type="xs:long" />
    <xs:attribute name="sequenceNumber" type="xs:long" />
    <xs:attribute name="transmittedTime" type="xs:dateTime" />
    <xs:attribute name="acknowledgedStatus" type="xs:string" />
    <xs:attribute name="acknowledgedTime" type="xs:dateTime" />
    <xs:attribute name="modificationTime" type="xs:dateTime" />
    <xs:attribute name="modificationUserId" type="xs:string" />
  </xs:complexType>
  <xs:element name="TestQuestion" type="TestQuestion" />
  <xs:complexType name="TestQuestion">
    <xs:sequence />
    <xs:attribute name="id" type="xs:long" />
    <xs:attribute name="formElementErrorId" type="xs:long" />
    <xs:attribute name="modulePublicId" type="xs:long" />
    <xs:attribute name="moduleVersion" type="xs:decimal" />
    <xs:attribute name="moduleAlternateMetadataType" type="xs:string" />
    <xs:attribute name="moduleAlternateMetadataId" type="xs:string" />
    <xs:attribute name="repeatSequenceNumber" type="xs:integer" />
    <xs:attribute name="dataElementPublicId" type="xs:long" />
    <xs:attribute name="dataElementVersion" type="xs:decimal" />
    <xs:attribute name="alternateMetadataType" type="xs:string" />
    <xs:attribute name="alternateMetadataId" type="xs:string" />
    <xs:attribute name="modificationTime" type="xs:dateTime" />
    <xs:attribute name="modificationUserId" type="xs:string" />
  </xs:complexType>
  <xs:element name="InformationProcess" type="InformationProcess" />
  <xs:complexType name="InformationProcess">
    <xs:sequence />
    <xs:attribute name="id" type="xs:long" />
    <xs:attribute name="uniqueName" type="xs:string" />
    <xs:attribute name="description" type="xs:string" />
    <xs:attribute name="processType" type="xs:string" />
    <xs:attribute name="processStatus" type="xs:string" />
    <xs:attribute name="processingRank" type="xs:long" />
    <xs:attribute name="startTime" type="xs:dateTime" />
    <xs:attribute name="endTime" type="xs:dateTime" />
    <xs:attribute name="subscriberUniqueName" type="xs:string" />
    <xs:attribute name="originatorUniqueName" type="xs:string" />
    <xs:attribute name="publisherUniqueName" type="xs:string" />
    <xs:attribute name="retrievalSequenceNumber" type="xs:long" />
    <xs:attribute name="serviceURL" type="xs:string" />
    <xs:attribute name="modificationTime" type="xs:dateTime" />
    <xs:attribute name="modificationUserId" type="xs:string" />
  </xs:complexType>
  <xs:element name="Form" type="Form" />
  <xs:complexType name="Form">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="1" name="publisher" type="Institution" />
      <xs:element minOccurs="0" maxOccurs="1" name="originator" type="Institution" />
    </xs:sequence>
    <xs:attribute name="id" type="xs:long" />
    <xs:attribute name="originatorInstitutionId" type="xs:long" />
    <xs:attribute name="publisherInstitutionId" type="xs:long" />
    <xs:attribute name="instanceId" type="xs:string" />
    <xs:attribute name="publicId" type="xs:long" />
    <xs:attribute name="version" type="xs:decimal" />
    <xs:attribute name="alternateMetadataType" type="xs:string" />
    <xs:attribute name="alternateMetadataId" type="xs:string" />
    <xs:attribute name="currentFormRevisionSequenceNumber" type="xs:integer" />
    <xs:attribute name="modificationTime" type="xs:dateTime" />
    <xs:attribute name="modificationUserId" type="xs:string" />
  </xs:complexType>
  <xs:element name="ProcessingStatus" type="ProcessingStatus" />
  <xs:complexType name="ProcessingStatus">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="1" name="informationProcess" type="InformationProcess" />
      <xs:element minOccurs="0" maxOccurs="1" name="formRevision" type="FormRevision" />
      <xs:element minOccurs="0" maxOccurs="1" name="outputFormRevision" type="FormRevision" />
      <xs:element minOccurs="0" maxOccurs="1" name="parentProcessingStatus" type="ProcessingStatus" />
    </xs:sequence>
    <xs:attribute name="id" type="xs:long" />
    <xs:attribute name="informationProcessId" type="xs:long" />
    <xs:attribute name="formRevisionId" type="xs:long" />
    <xs:attribute name="parentProcessingStatusId" type="xs:long" />
    <xs:attribute name="processingRank" type="xs:long" />
    <xs:attribute name="attemptNumber" type="xs:long" />
    <xs:attribute name="outputFormRevisionId" type="xs:long" />
    <xs:attribute name="value" type="xs:string" />
    <xs:attribute name="startTime" type="xs:dateTime" />
    <xs:attribute name="endTime" type="xs:dateTime" />
    <xs:attribute name="note" type="xs:string" />
    <xs:attribute name="modificationTime" type="xs:dateTime" />
    <xs:attribute name="modificationUserId" type="xs:string" />
  </xs:complexType>
  <xs:element name="FormElementError" type="FormElementError" />
  <xs:complexType name="FormElementError">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="testQuestionCollection" type="TestQuestion" />
      <xs:element minOccurs="0" maxOccurs="1" name="rawData" type="xs:string" />
    </xs:sequence>
    <xs:attribute name="id" type="xs:long" />
    <xs:attribute name="formRevisionId" type="xs:long" />
    <xs:attribute name="questionId" type="xs:long" />
    <xs:attribute name="type" type="xs:string" />
    <xs:attribute name="message" type="xs:string" />
    <xs:attribute name="modificationTime" type="xs:dateTime" />
    <xs:attribute name="modificationUserId" type="xs:string" />
  </xs:complexType>
</xs:schema>